<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,viewport-fit=cover">
    <title>IOS安全区域适配</title>
</head>
<body>
    <pre>需要新增 <meta name="viewport" content="viewport-fit=cover"> 标签</pre>
</body>
<style>
    @supports ((height: constant(safe-area-inset-top)) or (height: env(safe-area-inset-top))) and (-webkit-overflow-scrolling: touch) {
        body {
            padding-top: constant(safe-area-inset-top, 20px);
            padding-top: env(safe-area-inset-top, 20px);

            padding-left: constant(safe-area-inset-left, 20px);
            padding-left: env(safe-area-inset-left, 20px);

            padding-right: constant(safe-area-inset-right, 20px);
            padding-right: env(safe-area-inset-right, 20px);

            padding-bottom: constant(safe-area-inset-bottom, 20px);
            padding-bottom: env(safe-area-inset-bottom, 20px);
        }
    }
</style>
</html>